package com.test5;

import java.io.PrintWriter;

public class PrintWriterTest {
    public static void main(String[] args) throws Exception {
        //创建打印流
        PrintWriter pw = new PrintWriter("C:\\Users\\LDH\\Desktop\\test2.txt");
        //打印
        pw.println(97);
        pw.println(true);
        pw.println("a");
        pw.println(3.14);
        //会自动刷新
        //关闭
        pw.close();
    }
}
